/*
 * @Author: vincent040 18620373040@163.com
 * @Date: 2023-08-13 17:15:57
 * @LastEditors: vincent040 18620373040@163.com
 * @LastEditTime: 2023-08-13 17:55:36
 * @FilePath: /gitee/i-teaching/04 - 数据结构与算法/第03章-基础数据结构 · 栈和队列/code/Y型车轨/include/stack.h
 * Copyright (c) 2023 by GEC, All Rights Reserved. 
 * @Description: 
 */
#ifndef __STACK_
#define __STACK_

#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include "list.h"

// 链栈管理结构体
typedef struct
{
    node *top;
    int number;
}linkstack;

linkstack * init_stack();
node *new_stack_node(int data);
void push(linkstack *s, int data);
bool stack_is_empty(linkstack *s);
node *pop(linkstack *s);
node *top(linkstack *s);

#endif